﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace MMS.DAL
{
    public class DBService
    {
        /// <summary>
        /// 数据层用户登录
        /// </summary>
        /// <param name="sql"></param>
        /// <param name="sqlAdress"></param>
        /// <returns></returns>
        public bool intoDB(string sql,string sqlAdress)
        {
            SqlConnection conn = new SqlConnection(sqlAdress);
            conn.Open();
            SqlCommand cmd = new SqlCommand(sql, conn);
            cmd.ExecuteScalar();
            if (cmd.ExecuteScalar() == null)
            {
                return false;
            }
            else
            {
                return true;
            }
            conn.Close();
        }
    }
}
